package foundamental.version2;



import java.util.ArrayList;
import java.util.List;

/**
 * Created by chenjun on 2017/12/18.
 */
public class A {
    List<B> bList = new ArrayList<>();
    public A(){
        bList.add(new B(1));
        bList.add(new B(2));
        bList.add(new B(3));
        bList.add(new B(4));
    }

    private  int i = -1;
    public  void am1(){
        i++;
        if(i>= bList.size()) return;

        System.out.println("method 1 in a----" + i);
        B b = bList.get(i);
        b.bm1(this);
    }
}
